<?php
// *** Tangra (Application Framework and Tools for PHP)
// $Id$
//


require_once($WSC->get_site_inc_dir().'modules/caramel_ajax_grid_ctrl/caramel_ajax_grid_ctrl.class.php');


abstract class Jabba_Ajax_Grid_Ctrl extends Caramel_Ajax_Grid_Ctrl {
	public function run() {
		$context = $this->get__context();

		$grid_ctrl = $this->get_grid_ctrl();
		$set_page_event = $grid_ctrl->get_grid_set_page_event();

		$page_num = $set_page_event->is_it_me($context);

		$dbc = $this->get_dbc();

		$grid_ctrl->process($dbc, $page_num);
		$ret['result_code'] = Ajax_Ctrl::STATUS_OK;

		$this->send_response($ret, $this->get_html());
	}
}
